import { TabBar } from 'antd-mobile';
import router from 'umi/router';
import styles from './style.less';

const Footer = ({ pathname }) => {

  return (
    <div className={styles.footer}>
      <TabBar>
        <TabBar.Item
          title="视图"
          key="home"
          icon={<div className={`${styles['footer-icon']} ${styles['home-off']}`} />}
          selectedIcon={<div className={`${styles['footer-icon']} ${styles['home-on']}`} />}
          selected={pathname === '/'}
          // badge={1}
          onPress={() => {
            router.push('/')
          }}
          data-seed="logId"
        />
        <TabBar.Item
          title="我的"
          key="mine"
          icon={<div className={`${styles['footer-icon']} ${styles['mine-off']}`} />}
          selectedIcon={<div className={`${styles['footer-icon']} ${styles['mine-on']}`} />}
          selected={pathname === '/mine'}
          // badge={1}
          onPress={() => {
            router.push('/mine')
          }}
          data-seed="logId"
        />
      </TabBar>
    </div>
  );
};

export default Footer;
